package com.myspace.controller.post;

import com.myspace.pojo.Post;
import com.myspace.service.space.post.GetPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GetPostController {
    @Autowired
    private GetPostService getPostService;

    @GetMapping("/myspace/getpost/")
    public List<Post> getpost(@RequestParam Integer user_id) {
        return getPostService.getpost(user_id);
    }
}
